import pytest
from utils.driver import Driver
from page.searchPage import SearchTask
from page.settingPage import SettingTask


class Test:
    def setup_class(self):
        # Driver.get_app_driver()
        # self.driver = Driver.get_app_driver()
        # self.driver.implicitly_wait(3)
        SettingTask.goto_search_page()

    def teardown_class(self):
        Driver.quit_app_driver()

    @pytest.mark.parametrize("a,b", [('i', 'IP地址'), ('m', 'MAC地址'), (1, '休眠')])
    def test_search(self, a, b):
        print("\n{}".format(SearchTask.search(a)))
        assert b in SearchTask.search(a)
